package com.hqq.behaviour.dependency_injection;

import com.google.inject.Inject;

/**
 * AdvancedWizard
 * 实现控制反转 依赖传入的对象
 * Created by heqianqian on 2017/6/14.
 */
public class AdvancedWizard implements Wizard {

    private Tobacco tobacco;

    @Inject
    public AdvancedWizard(Tobacco tobacco) {
        this.tobacco = tobacco;
    }

    @Override
    public void smoke() {
        tobacco.smoke(this);
    }


}
